(cl-defstruct): Improve handling of unknown options
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Apr 2024 01:17:47 +0000 (21:17 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Apr 2024 01:17:47 +0000 (21:17 -0400)
commit484b0979099d91e286c248e32b2f693111fac2ad
treee49d353db50f7e0b1aad43c0cce686e7dd0212db
parent2141caca30860ee04cad44ae2ad32744c1c11987
(cl-defstruct): Improve handling of unknown options

Until now `cl-defstruct` signaled an error when encountering an
unknown option.  It's easy to code and it does the job, but it
doesn't give good location info in the compiler's output,
and it makes it more painful to use not-yet-supported options.
So just signal a warning instead.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Warn about unknown
options, instead of signaling an error.
lisp/emacs-lisp/cl-macs.el